CC = g++
CFLAG = -O1 -Wall
LFLAG = -static-libgcc -lGL -lGLU -lglut -lglui

SRC = $(sort $(wildcard *.cpp))
OBJ = $(patsubst %.cpp,%.o,$(SRC))
EXE = ../bin/pipeline

all:$(OBJ)
	$(shell cp -r ../res/texture ../bin)
	$(shell cp -r ../res/object ../bin)
	$(shell cp -r ../res/screenshot ../bin)
	$(CC) $(OBJ) ${LFLAG} -o $(EXE)

%.o:%.cpp
	${CC} ${CFLAG} -c $<

clean:
	$(shell rm -f *.o 2>/dev/null)